# -*- coding: utf-8 -*-            
# @Author : liguang
# @Time : 2023/11/17 17:28

import json

data = [{"name": "liguang", "age": 16}, {"name": "ligang", "age": 15}]
json_value_1 = json.dumps(data, ensure_ascii=False)
print(f"转换后的json数据为----->：{json_value_1}")

str_value = '[{"name": "liguang", "age": 16}, {"name": "ligang", "age": 15}]'
python_data_type = json.loads(str_value)
print(f"获取得到的数据类型是:{type(python_data_type)},对应的值是：{python_data_type}")
